
 $(function() {
    $("#calendar").datepicker({
      showAnim: "slide",
      changeMonth: true,
      changeYear: true,
      dateFormat: "yy-mm-dd",
      showOtherMonths: true,
      selectOtherMonths: true,
      maxDate: "+1M +10D", 
      defaultDate: -8000
    });
  });